/*
 * @Author: sympsel sympsel@outlook.com
 * @Date: 2025-07-18 18:19:33
 * @LastEditors: sympsel sympsel@outlook.com
 * @LastEditTime: 2025-07-18 20:45:43
 * @FilePath: \work25_7_18\src\heap.h
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
#include <assert.h>

#define MALLOC(_type_, _count_) (_type_*)malloc(sizeof(_type_) * (_count_))
#define REALLOC(_object_, _type_, _count_) (_type_*)realloc(_object_, sizeof(_type_) * (_count_))
#define SWAP(_type_, _a_, _b_) _type_ temp = _a_;\
                                _a_ = _b_;\
                                _b_ = temp;
#define DEFAULT_CAPACITY 10


typedef int HPDataType;
typedef struct Heap
{
	HPDataType* _data;
	int _size;
	int _capacity; 
}Heap;

Heap* HeapInit();
// 堆的销毁
void HeapDestory(Heap* heap);
// 堆的插入
void HeapPush(Heap* heap, HPDataType data);
// 堆的删除
HPDataType HeapPop(Heap* heap);
// 取堆顶的数据
HPDataType HeapTop(Heap* heap);
// 堆的数据个数
int HeapSize(Heap* heap);
// 堆的判空
bool HeapEmpty(Heap* heap);